<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCorporationTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
	    Schema::create('app_corporations', function (Blueprint $table) {
		    $table->engine = 'InnoDB';
		    $table->increments('id');
		    $table->string('name', 120);
		    $table->string('ceo', 30);
		    $table->string('address', 120);
		    $table->string('logo', 200);
		    $table->string('contact', 12);
		    $table->integer('number')->default(0);
		    $table->tinyInteger('status')->default(1);
		    $table->timestamps();

		    $table->unique('name', 'corporations_name_unique');
	    });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
	    Schema::drop('app_corporations');
    }
}
